package paopaoteacher;

import java.util.Arrays;

public class P13 {
    public static void main(String[] args) {
       int []arr={40,8,78,9,10};
       for (int i=1;i<arr.length;i++){
           for (int j = 0; j < arr.length-i; j++) {
               if (arr[j]>arr[j+1]){
                   int temp=arr[j];
                   arr[j]=arr[j+1];
                   arr[j+1]=temp;
               }
           }

       }
        System.out.println("最终结果:"+Arrays.toString(arr));
    }
}
